(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/article/detail" ], {
    "34d5": function(t, e, n) {
        var i = n("b400");
        n.n(i).a;
    },
    "40c1": function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return a;
        }), n.d(e, "a", function() {
            return i;
        });
        var i = {
            wkParser: function() {
                return Promise.all([ n.e("common/vendor"), n.e("components/wk-parser/index") ]).then(n.bind(null, "1675"));
            },
            wkSkeletons: function() {
                return n.e("components/wk-skeletons/index").then(n.bind(null, "5375"));
            }
        }, o = function() {
            this.$createElement;
            this._self._c;
        }, a = [];
    },
    "58f7": function(t, e, n) {
        n.r(e);
        var i, o = n("abee"), a = n.n(o);
        for (i in o) "default" !== i && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(i);
        e.default = a.a;
    },
    "87c2": function(t, e, i) {
        (function(t) {
            i("767a"), n(i("66fd"));
            var e = n(i("d46b"));
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(e.default);
        }).call(this, i("543d").createPage);
    },
    abee: function(t, e, n) {
        (function(n) {
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var t = {
                components: {},
                data: function() {
                    return {
                        id: 0,
                        article: {
                            comment: {
                                count: 0,
                                list: []
                            }
                        },
                        isLoading: 1,
                        showAddComment: !1,
                        showCommenBar: !0,
                        addCommentFocus: !1,
                        commentContent: "",
                        replyCommentId: 0,
                        replyNickname: "",
                        page_index: 1,
                        page_size: 10,
                        hasMoreData: !1,
                        showPageLoading: !0,
                        currentUrl: "",
                        shareUrl: "",
                        showShareTip: !1,
                        showH5Share: !1,
                        showBrowserShareTip: !1,
                        lethouses: [],
                        oldhouses: []
                    };
                },
                onShow: function(t) {},
                onLoad: function(t) {
                    this.id = this.$Route.query.id, this.getData(), wx.showShareMenu({
                        withShareTicket: !0,
                        menus: [ "shareAppMessage", "shareTimeline" ]
                    });
                },
                onPullDownRefresh: function() {
                    n.showLoading({
                        title: "刷新中"
                    }), this.page_index = 1, this.getData();
                },
                onReachBottom: function(t) {
                    this.hasMoreData && this.getComment();
                },
                onShareAppMessage: function() {
                    return {
                        path: "/pages/article/detail?id=" + this.article.id,
                        success: function(t) {},
                        title: this.info.title,
                        imageUrl: this.info.photo_url
                    };
                },
                onShareTimeline: function(t) {
                    return {
                        title: this.article.title
                    };
                },
                methods: {
                    loadData: function() {
                        this.getData();
                    },
                    getData: function() {
                        var e = this;
                        this.$api("content.article_detail", {
                            id: e.id
                        }).then(function(t) {
                            0 === t.errno && (t = t.data.article, n.setNavigationBarTitle({
                                title: t.title
                            }), e.article = t, e.isLoading = 0, e.$refs.content.setContent(t.content));
                        });
                    },
                    like: function() {
                        var n = this;
                        this.$app.request({
                            url: this.$api.article.like,
                            data: {
                                article_id: this.id
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                var e;
                                console.log("res"), 0 == t.code ? (n.info.is_like = !n.info.is_like, e = n.info.is_like ? "点赞成功" : "已取消点赞", 
                                n.$alert(e, "success")) : n.$alert(t.msg, "warning");
                            }
                        });
                    },
                    commentLike: function(t, n) {
                        var i = this;
                        this.$app.request({
                            url: this.$api.article.commentLike,
                            data: {
                                comment_id: t
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                var e;
                                0 == t.code ? (i.info.comment.list[n].is_like ? (i.info.comment.list[n].is_like = !1, 
                                --i.info.comment.list[n].like_count) : (i.info.comment.list[n].is_like = !0, i.info.comment.list[n].like_count += 1), 
                                e = i.info.comment.list[n].is_like ? "点赞成功" : "已取消点赞", i.$alert(e)) : i.$alert(t.msg);
                            }
                        });
                    },
                    favorite: function() {
                        var n = this;
                        this.$app.request({
                            url: this.$api.article.favorite,
                            data: {
                                article_id: this.id
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                var e;
                                console.log("res"), 0 == t.code ? (n.info.is_favorite = !n.info.is_favorite, e = n.info.is_favorite ? "收藏成功" : "已取消收藏", 
                                n.$alert(e, "success")) : n.$alert(t.msg, "warning");
                            }
                        });
                    },
                    initAddComment: function(t) {
                        var e = this;
                        t && this.$app.initLogin(), this.showAddComment = t, this.commentContent = "", 0 < this.replyCommentId && (this.replyCommentId = 0, 
                        this.replyNickname = ""), setTimeout(function() {
                            e.addCommentFocus = t;
                        }, 200);
                    },
                    addCommentOrReply: function() {
                        "" != this.commentContent ? 0 < this.replyCommentId ? this.addReply() : this.addComment() : this.$alert("评论内容不能为空");
                    },
                    addComment: function() {
                        var e = this;
                        this.$app.request({
                            url: this.$api.article.addComment,
                            data: {
                                article_id: this.id,
                                content: this.commentContent,
                                page_size: this.page_size
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                0 == t.code ? (e.info.comment = t.data, e.showAddComment = !1, e.commentContent = "", 
                                e.$alert("评论成功")) : e.$alert(t.msg);
                            }
                        });
                    },
                    initAddReply: function(t, e) {
                        this.initAddComment(!0), this.replyCommentId = t, this.replyNickname = e;
                    },
                    addReply: function() {
                        var e = this;
                        "" != this.commentContent ? this.$app.request({
                            url: this.$api.article.addReply,
                            data: {
                                comment_id: this.replyCommentId,
                                content: this.commentContent,
                                page_size: this.page_size
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                0 == t.code ? (e.info.comment = t.data, e.showAddComment = !1, e.replyCommentId = 0, 
                                e.replyNickname = "", e.commentContent = "", e.$alert("评论成功")) : e.$alert(t.msg);
                            }
                        }) : this.$alert("回复内容不能为空");
                    },
                    getComment: function() {
                        var e = this;
                        this.$app.request({
                            url: this.$api.article.comment,
                            data: {
                                article_id: this.id,
                                page_index: this.page_index,
                                page_size: this.page_size
                            },
                            method: "POST",
                            dataType: "json",
                            success: function(t) {
                                0 == t.code ? (console.log(e.info.comment), e.info.comment.list = e.info.comment.list.concat(t.data.list), 
                                e.info.comment.count = t.data.count, t.data.page > e.page_index ? e.hasMoreData = !0 : e.hasMoreData = !1, 
                                e.page_index += 1) : e.$alert(t.msg);
                            },
                            complete: function(t) {
                                n.stopPullDownRefresh(), n.hideLoading();
                            }
                        });
                    },
                    openLink: function(t) {
                        console.log(t), window.location.href = t;
                    },
                    closeH5Share: function() {
                        this.showH5Share = !1;
                    },
                    closeShareTip: function() {
                        this.showShareTip = !1;
                    },
                    showBrowserShareTips: function() {
                        this.showH5Share = !1, this.showBrowserShareTip = !0;
                    },
                    closeBrowserShareTip: function() {
                        this.showBrowserShareTip = !1;
                    },
                    share: function() {
                        console.log("share"), n.showShareMenu();
                    },
                    initMPShare: function() {},
                    redirectCommentDetail: function(t, e) {
                        0 < e && n.navigateTo({
                            url: "commentDetail?id=" + t
                        });
                    },
                    copyText: function(t) {
                        var e = this;
                        n.setClipboardData({
                            data: t,
                            success: function(t) {
                                e.$alert("原文链接已复制", "success");
                            }
                        });
                    }
                }
            };
            e.default = t;
        }).call(this, n("543d").default);
    },
    b400: function(t, e, n) {},
    d46b: function(t, e, n) {
        n.r(e);
        var i, o = n("40c1"), a = n("58f7");
        for (i in a) "default" !== i && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(i);
        n("34d5");
        var s = n("f0c5"), o = Object(s.a)(a.default, o.b, o.c, !1, null, "5fb30282", null, !1, o.a, void 0);
        e.default = o.exports;
    }
}, [ [ "87c2", "common/runtime", "common/vendor" ] ] ]);